package com.blueocean_health.care.management.domain.base;

import java.math.BigDecimal;
import java.math.RoundingMode;
import java.util.Date;
import javax.persistence.*;

import com.alibaba.fastjson.annotation.JSONField;
import com.blueocean_health.care.management.common.base.em.TimeType;
import com.blueocean_health.care.management.common.base.string.StringUtils;
import com.blueocean_health.care.management.common.base.time.TimeUtils;
import com.blueocean_health.care.management.common.excel.ExcelResources;
import com.blueocean_health.care.management.em.OrderTimeTypeEnum;
import com.blueocean_health.care.management.em.OrderTypeEnum;
import com.blueocean_health.care.management.em.ServiceTypeEnum;

public class Selectzhdzlist {
    @Column(name = "Id")
    @GeneratedValue(strategy = GenerationType.IDENTITY)
    private Integer id;

    /**
     * 创建时间
     */
    @JSONField(format = "yyyy-MM-dd HH:mm:ss")
    @Column(name = "create_time")
    private Date createTime;

    /**
     * 订单ID
     */
    @Column(name = "order_id")
    private String orderId;

    /**
     * 患者
     */
    @Column(name = "patient_name")
    private String patientName;

    /**
     * 1:新入 2:续费  3:退款
     */
    @Column(name = "order_type")
    private String orderType;
    
    
    private String orderTypeName;//订单类型 1:新入 2:续费  3:退款
    /**
     * 医院名称
     */
    @Column(name = "hospital_name")
    private String hospitalName;
    private String hospitalId;
    /**
     * 联系人
     */
    private String contact;

    /**
     * 手机号
     */
    private String phone;

    /**
     * 服务类型Id
     */
    @Column(name = "service_type")
    private String serviceType;

    /**
     * 开始时间
     */
    @JSONField(format = "yyyy-MM-dd HH:mm:ss")
    @Column(name = "begin_time")
    private Date beginTime;

    /**
     * 结束时间
     */
    @JSONField(format = "yyyy-MM-dd HH:mm:ss")
    @Column(name = "end_time")
    
    private Date endTime;

    /**
     * 服务天数
     */
    @Column(name = "day")
    private String day;

    /**
     * 优惠后总价
     */
    @Column(name = "actual_total_price")
    private Double actualTotalPrice;

    /**
     * 小时价格
     */
    @Column(name = "one_hour_price")
    private Double oneHourPrice;
    /**
     * 标准小时价格
     * 
     */
    private Double standardOneHourPrice;
    /**
     * 单日价格
     */
    @Column(name = "one_day_price")
    private Double oneDayPrice;
    /**
     * 标准日单价
     */
    private Double standardOneDayPrice;
    @Column(name = "one_hour_pay")
    private Double oneHourPay;
    /**
     * 标准小时工资
     */
    private Double standardOneHourPay;
    @Column(name = "one_day_pay")
    private Double oneDayPay;
    /**
     * 标准日工资
     */
    private Double standardoneDayPay;
    /**
     * 科室id
     */
    private Integer department;

    /**
     * 科室名称
     */
    
    @Column(name = "dept_name")
    private String deptName;

    /**
     * 楼层id
     */
    private Integer floor;

    /**
     * 楼层名称
     */
    @Column(name = "floor_name")
    private String floorName;

    /**
     * 楼号id
     */
    @Column(name = "building_number")
    private Integer buildingNumber;

    /**
     * 楼号名称
     */
    @Column(name = "building_name")
    private String buildingName;

    /**
     * 病床号
     */
    @Column(name = "hospital_bed")
    private String hospitalBed;

    /**
     * 用户名称
     */
    @Column(name = "user_real_name")
    private String userRealName;

    /**
     * 订单状态:1:待派单、2:待服务、3：服务中、4:退款中、5:完成、6:取消、7:已退款
     */
    @Column(name = "order_status")
    private String orderStatus;

    /**
     * 是否收款  1：未收款 2：已收款
     */
    @Column(name = "pay_status")
    private String payStatus;


    /**
     * 收据编号
     */
    @Column(name = "receipt_number")
    private String receiptNumber;

    /**
     * 开票日期
     */
    @JSONField(format = "yyyy-MM-dd")
    @Column(name = "billing_time")
    private Date billingTime;

    @Column(name = "worker_names")
    private String workerNames;

    @Column(name = "worker_name_pin_yinn")
    private String workerNamePinYinn;

	private String serviceTypeName;
	private String departmentFB;
	private String illnessGrade;
	private String  orderTypeFlag;
	private String serviceId;
	private String remark;
	private Double totalPay;
	private String baoxian;//保险（元/单
	private String shoukuan;//收款总额
	private String cftq;//餐费提取标准
	private String hzglf;//合作管理费
	private String kswhf;//科室维护费
	private Double jianCaiPrice;//收入金额
	private String timeType;
	private String timeTypeName;
	private Integer caiHour;//拆分后小时 
	private Integer caiDay;//拆分后金额
	  @Column(name = "actual_day_price")
	    private Double actualDayPrice;
	    private Date beginTimes;

	    
	    private Date endTimes;

	public Date getBeginTimes() {
			return beginTimes;
		}

		public void setBeginTimes(Date beginTimes) {
			this.beginTimes = beginTimes;
		}

		public Date getEndTimes() {
			return endTimes;
		}

		public void setEndTimes(Date endTimes) {
			this.endTimes = endTimes;
		}

	public Double getActualDayPrice() {
		return actualDayPrice;
	}

	public void setActualDayPrice(Double actualDayPrice) {
		this.actualDayPrice = actualDayPrice;
	}


	public Integer getCaiHour() {
		return caiHour;
	}

	public void setCaiHour(Integer caiHour) {
		this.caiHour = caiHour;
	}

	public Integer getCaiDay() {
		return caiDay;
	}

	public void setCaiDay(Integer caiDay) {
		this.caiDay = caiDay;
	}

	public String getTimeType() {
		return timeType;
	}

	public void setTimeType(String timeType) {
		this.timeType = timeType;
	}
	@ExcelResources(title = "时间类型", order = 3)
	public String getTimeTypeName() {
		return getTimeType()==null||getTimeType().equals("")?null:OrderTimeTypeEnum.valueOf("_"+getTimeType()).getVal();
	}

	public void setTimeTypeName(String timeTypeName) {
		this.timeTypeName = timeTypeName;
	}
	@ExcelResources(title = "收款金额", order = 21,isNum=1)
	public Double getJianCaiPrice() {
		if(StringUtils.isEmpty(jianCaiPrice))
			return null;
		 BigDecimal bg = new BigDecimal(jianCaiPrice).setScale(2, RoundingMode.HALF_UP);
		return bg.doubleValue();
	}

	public void setJianCaiPrice(Double jianCaiPrice) {
		this.jianCaiPrice = jianCaiPrice;
	}

	public String getServiceId() {
		return serviceId;
	}

	public void setServiceId(String serviceId) {
		this.serviceId = serviceId;
	}

	@ExcelResources(title = "保险（元/单）", order = 20)
	public String getBaoxian() {
		return baoxian;
	}

	public void setBaoxian(String baoxian) {
		this.baoxian = baoxian;
	}
	public String getShoukuan() {
		return shoukuan;
	}

	public void setShoukuan(String shoukuan) {
		this.shoukuan = shoukuan;
	}
	@ExcelResources(title = "餐费提取标准（元/天）", order = 25)
	public String getCftq() {
		return cftq;
	}

	public void setCftq(String cftq) {
		this.cftq = cftq;
	}
	@ExcelResources(title = "合作管理费", order = 27)
	public String getHzglf() {
		return hzglf;
	}

	public void setHzglf(String hzglf) {
		this.hzglf = hzglf;
	}
	@ExcelResources(title = "科室维护费", order = 28)
	public String getKswhf() {
		return kswhf;
	}

	public void setKswhf(String kswhf) {
		this.kswhf = kswhf;
	}
	@ExcelResources(title = "护理费总额", order = 26,isNum = 1)
	public Double getTotalPay() {
		if(StringUtils.isEmpty(totalPay))
			return null;
		BigDecimal bg = new BigDecimal(totalPay).setScale(2, RoundingMode.HALF_UP);
		return bg.doubleValue();
	}

	public void setTotalPay(Double totalPay) {
		this.totalPay = totalPay;
	}

	@ExcelResources(title = "备注", order = 30)
    public String getRemark() {
		return remark;
	}

	public void setRemark(String remark) {
		this.remark = remark;
	}

	public String getIllnessGrade() {
		return illnessGrade;
	}

	public void setIllnessGrade(String illnessGrade) {
		this.illnessGrade = illnessGrade;
	}

	public String getOrderTypeFlag() {
		return orderTypeFlag;
	}

	public void setOrderTypeFlag(String orderTypeFlag) {
		this.orderTypeFlag = orderTypeFlag;
	}

	public String getHospitalId() {
		return hospitalId;
	}

	public void setHospitalId(String hospitalId) {
		this.hospitalId = hospitalId;
	}
	public Double getStandardOneHourPrice() {
		return standardOneHourPrice;
	}

	public void setStandardOneHourPrice(Double standardOneHourPrice) {
		this.standardOneHourPrice = standardOneHourPrice;
	}

	public Double getStandardOneDayPrice() {
		return standardOneDayPrice;
	}

	public void setStandardOneDayPrice(Double standardOneDayPrice) {
		this.standardOneDayPrice = standardOneDayPrice;
	}
	public Double getStandardOneHourPay() {
		return standardOneHourPay;
	}

	public void setStandardOneHourPay(Double standardOneHourPay) {
		this.standardOneHourPay = standardOneHourPay;
	}
	public Double getStandardoneDayPay() {
		return standardoneDayPay;
	}

	public void setStandardoneDayPay(Double standardoneDayPay) {
		this.standardoneDayPay = standardoneDayPay;
	}
	//@ExcelResources(title = "科室", order = 10)
	public String getDepartmentFB() {
		return departmentFB;
	}

	public void setDepartmentFB(String departmentFB) {
		this.departmentFB = departmentFB;
	}
	@ExcelResources(title = "服务类型", order = 10)
	public String getServiceTypeName() {
		return getServiceType()==null||getServiceType().equals("")?null:ServiceTypeEnum.valueOf("_"+getServiceType()).getVal();
	}

	public void setServiceTypeName(String serviceTypeName) {
		this.serviceTypeName = serviceTypeName;
	}
    /**
     * @return Id
     */
    public Integer getId() {
        return id;
    }

    /**
     * @param id
     */
    public void setId(Integer id) {
        this.id = id;
    }

    /**
     * 获取创建时间
     *
     * @return create_time - 创建时间
     */
    public Date getCreateTime() {
        return createTime;
    }

    /**
     * 设置创建时间
     *
     * @param createTime 创建时间
     */
    public void setCreateTime(Date createTime) {
        this.createTime = createTime;
    }

    /**
     * 获取订单ID
     *
     * @return order_id - 订单ID
     */
    public String getOrderId() {
        return orderId;
    }

    /**
     * 设置订单ID
     *
     * @param orderId 订单ID
     */
    public void setOrderId(String orderId) {
        this.orderId = orderId;
    }

    /**
     * 获取患者
     *
     * @return patient_name - 患者
     */
    @ExcelResources(title = "患者姓名", order = 7)
    public String getPatientName() {
        return patientName;
    }

    /**
     * 设置患者
     *
     * @param patientName 患者
     */
    public void setPatientName(String patientName) {
        this.patientName = patientName;
    }

    /**
     * 获取1:新入 2:续费  3:退款
     *
     * @return order_type - 1:新入 2:续费  3:退款
     */
    public String getOrderType() {
        return orderType;
    }

    /**
     * 设置1:新入 2:续费  3:退款
     *
     * @param orderType 1:新入 2:续费  3:退款
     */
    public void setOrderType(String orderType) {
        this.orderType = orderType;
    }
    @ExcelResources(title = "订单类型", order = 2)
	public String getOrderTypeName() {
    	return getOrderType()==null||"".equals(getOrderType())?null:OrderTypeEnum.valueOf("_"+getOrderType()).getVal();
	}

	public void setOrderTypeName(String orderTypeName) {
		this.orderTypeName = orderTypeName;
	}
    /**
     * 获取医院名称
     *
     * @return hospital_name - 医院名称
     */
	 @ExcelResources(title = "医院名称", order = 1)
    public String getHospitalName() {
        return hospitalName;
    }

    /**
     * 设置医院名称
     *
     * @param hospitalName 医院名称
     */
    public void setHospitalName(String hospitalName) {
        this.hospitalName = hospitalName;
    }

    /**
     * 获取联系人
     *
     * @return contact - 联系人
     */
    @ExcelResources(title = "联系人", order = 8)
    public String getContact() {
        return contact;
    }

    /**
     * 设置联系人
     *
     * @param contact 联系人
     */
    public void setContact(String contact) {
        this.contact = contact;
    }

    /**
     * 获取手机号
     *
     * @return phone - 手机号
     */
    @ExcelResources(title = "联系电话", order = 9)
    public String getPhone() {
        return phone;
    }

    /**
     * 设置手机号
     *
     * @param phone 手机号
     */
    public void setPhone(String phone) {
        this.phone = phone;
    }

    /**
     * 获取服务类型Id
     *
     * @return service_type - 服务类型Id
     */
    public String getServiceType() {
        return serviceType;
    }

    /**
     * 设置服务类型Id
     *
     * @param serviceType 服务类型Id
     */
    public void setServiceType(String serviceType) {
        this.serviceType = serviceType;
    }

    /**
     * 获取开始时间
     *
     * @return begin_time - 开始时间
     */
    @ExcelResources(title = "服务开始时间", order = 15)
    public String getBeginTime() {
    	if(StringUtils.isEmpty(beginTime)){
			return null;
		}
    	if(!StringUtils.isEmpty(serviceType)&&serviceType.equals(ServiceTypeEnum._5.getKey())){
    		return TimeUtils.getStringByDate(beginTime, TimeType.yyyy_MM_dd);
    	}
		return TimeUtils.getStringByDate(beginTime, TimeType.yyyy_MM_dd_HH_mm_ss);
    }

    /**
     * 设置开始时间
     *
     * @param beginTime 开始时间
     */
    public void setBeginTime(Date beginTime) {
        this.beginTime = beginTime;
    }

    /**
     * 获取结束时间
     *
     * @return end_time - 结束时间
     */
    @ExcelResources(title = "服务结束时间", order = 16)
    public String getEndTime() {
    	if(StringUtils.isEmpty(endTime)){
			return null;
		}
    	if(!StringUtils.isEmpty(serviceType)&&serviceType.equals(ServiceTypeEnum._5.getKey())){
    		return TimeUtils.getStringByDate(endTime, TimeType.yyyy_MM_dd);
    	}
		return TimeUtils.getStringByDate(endTime, TimeType.yyyy_MM_dd_HH_mm_ss);
    }

    /**
     * 设置结束时间
     *
     * @param endTime 结束时间
     */
    public void setEndTime(Date endTime) {
        this.endTime = endTime;
    }

    /**
     * 获取服务天数
     *
     * @return DAY - 服务天数
     */
    @ExcelResources(title = "护工服务时长", order = 19)
    public String getDay() {
        return day;
    }

    /**
     * 设置服务天数
     *
     * @param day 服务天数
     */
    public void setDay(String day) {
        this.day = day;
    }

    /**
     * 获取优惠后总价
     *
     * @return actual_total_price - 优惠后总价
     */
    @ExcelResources(title = "收据金额", order = 22,isNum = 1)
    public Double getActualTotalPrice() {
        return actualTotalPrice;
    }

    /**
     * 设置优惠后总价
     *
     * @param actualTotalPrice 优惠后总价
     */
    public void setActualTotalPrice(Double actualTotalPrice) {
        this.actualTotalPrice = actualTotalPrice;
    }

    /**
     * 获取小时价格
     *
     * @return one_hour_price - 小时价格
     */
    @ExcelResources(title = "实际小时服务费", order = 18,isNum = 1)
    public Double getOneHourPrice() {
        return oneHourPrice;
    }

    /**
     * 设置小时价格
     *
     * @param oneHourPrice 小时价格
     */
    public void setOneHourPrice(Double oneHourPrice) {
        this.oneHourPrice = oneHourPrice;
    }

    /**
     * 获取单日价格
     *
     * @return one_day_price - 单日价格
     */
    @ExcelResources(title = "实际日服务费", order = 17,isNum = 1)
    public Double getOneDayPrice() {
        return oneDayPrice;
    }

    /**
     * 设置单日价格
     *
     * @param oneDayPrice 单日价格
     */
    public void setOneDayPrice(Double oneDayPrice) {
        this.oneDayPrice = oneDayPrice;
    }

    /**
     * @return one_hour_pay
     */
    @ExcelResources(title = "实际小时护理费", order = 24,isNum = 1)
    public Double getOneHourPay() {
        return oneHourPay;
    }

    /**
     * @param oneHourPay
     */
    public void setOneHourPay(Double oneHourPay) {
        this.oneHourPay = oneHourPay;
    }

    /**
     * @return one_day_pay
     */
    @ExcelResources(title = "实际日护理费", order = 23,isNum = 1)
    public Double getOneDayPay() {
        return oneDayPay;
    }

    /**
     * @param oneDayPay
     */
    public void setOneDayPay(Double oneDayPay) {
        this.oneDayPay = oneDayPay;
    }

    /**
     * 获取科室id
     *
     * @return department - 科室id
     */
    public Integer getDepartment() {
        return department;
    }

    /**
     * 设置科室id
     *
     * @param department 科室id
     */
    public void setDepartment(Integer department) {
        this.department = department;
    }

    /**
     * 获取科室名称
     *
     * @return dept_name - 科室名称
     */
    @ExcelResources(title = "科室", order = 13)
    public String getDeptName() {
        return deptName;
    }

    /**
     * 设置科室名称
     *
     * @param deptName 科室名称
     */
    public void setDeptName(String deptName) {
        this.deptName = deptName;
    }

    /**
     * 获取楼层id
     *
     * @return floor - 楼层id
     */
    public Integer getFloor() {
        return floor;
    }

    /**
     * 设置楼层id
     *
     * @param floor 楼层id
     */
    public void setFloor(Integer floor) {
        this.floor = floor;
    }

    /**
     * 获取楼层名称
     *
     * @return floor_name - 楼层名称
     */
    @ExcelResources(title = "楼层", order = 12)
    public String getFloorName() {
        return floorName;
    }

    /**
     * 设置楼层名称
     *
     * @param floorName 楼层名称
     */
    public void setFloorName(String floorName) {
        this.floorName = floorName;
    }

    /**
     * 获取楼号id
     *
     * @return building_number - 楼号id
     */
    public Integer getBuildingNumber() {
        return buildingNumber;
    }

    /**
     * 设置楼号id
     *
     * @param buildingNumber 楼号id
     */
    public void setBuildingNumber(Integer buildingNumber) {
        this.buildingNumber = buildingNumber;
    }

    /**
     * 获取楼号名称
     *
     * @return building_name - 楼号名称
     */
    @ExcelResources(title = "楼号", order = 11)
    public String getBuildingName() {
        return buildingName;
    }

    /**
     * 设置楼号名称
     *
     * @param buildingName 楼号名称
     */
    public void setBuildingName(String buildingName) {
        this.buildingName = buildingName;
    }

    /**
     * 获取病床号
     *
     * @return hospital_bed - 病床号
     */
    @ExcelResources(title = "病床号", order = 14)
    public String getHospitalBed() {
        return hospitalBed;
    }

    /**
     * 设置病床号
     *
     * @param hospitalBed 病床号
     */
    public void setHospitalBed(String hospitalBed) {
        this.hospitalBed = hospitalBed;
    }

    /**
     * 获取用户名称
     *
     * @return user_real_name - 用户名称
     */
    @ExcelResources(title = "签单人", order = 29)
    public String getUserRealName() {
        return userRealName;
    }

    /**
     * 设置用户名称
     *
     * @param userRealName 用户名称
     */
    public void setUserRealName(String userRealName) {
        this.userRealName = userRealName;
    }

    /**
     * 获取订单状态:1:待派单、2:待服务、3：服务中、4:退款中、5:完成、6:取消、7:已退款
     *
     * @return order_status - 订单状态:1:待派单、2:待服务、3：服务中、4:退款中、5:完成、6:取消、7:已退款
     */
    public String getOrderStatus() {
        return orderStatus;
    }

    /**
     * 设置订单状态:1:待派单、2:待服务、3：服务中、4:退款中、5:完成、6:取消、7:已退款
     *
     * @param orderStatus 订单状态:1:待派单、2:待服务、3：服务中、4:退款中、5:完成、6:取消、7:已退款
     */
    public void setOrderStatus(String orderStatus) {
        this.orderStatus = orderStatus;
    }

    /**
     * 获取是否收款  1：未收款 2：已收款
     *
     * @return pay_status - 是否收款  1：未收款 2：已收款
     */
    public String getPayStatus() {
        return payStatus;
    }

    /**
     * 设置是否收款  1：未收款 2：已收款
     *
     * @param payStatus 是否收款  1：未收款 2：已收款
     */
    public void setPayStatus(String payStatus) {
        this.payStatus = payStatus;
    }



    /**
     * 获取收据编号
     *
     * @return receipt_number - 收据编号
     */
    @ExcelResources(title = "收据编号", order = 4)
    public String getReceiptNumber() {
        return receiptNumber;
    }

    /**
     * 设置收据编号
     *
     * @param receiptNumber 收据编号
     */
    public void setReceiptNumber(String receiptNumber) {
        this.receiptNumber = receiptNumber;
    }

    /**
     * 获取开票日期
     *
     * @return billing_time - 开票日期
     */
    @ExcelResources(title = "开据日期", order = 5)
    public String getBillingTime() {
    	if(StringUtils.isEmpty(billingTime)){
			return null;
		}
		return TimeUtils.getStringByDate(billingTime, TimeType.yyyy_MM_dd);
    }

    /**
     * 设置开票日期
     *
     * @param billingTime 开票日期
     */
    public void setBillingTime(Date billingTime) {
        this.billingTime = billingTime;
    }

    /**
     * @return worker_names
     */
    @ExcelResources(title = "护工/小组", order = 6)
    public String getWorkerNames() {
        return workerNames;
    }

    /**
     * @param workerNames
     */
    public void setWorkerNames(String workerNames) {
        this.workerNames = workerNames;
    }

    /**
     * @return worker_name_pin_yinn
     */
    public String getWorkerNamePinYinn() {
        return workerNamePinYinn;
    }

    /**
     * @param workerNamePinYinn
     */
    public void setWorkerNamePinYinn(String workerNamePinYinn) {
        this.workerNamePinYinn = workerNamePinYinn;
    }

}